package com.yonyou.cyxdms.basedata.service.constant;

import java.util.regex.Pattern;

/**
 * BasedataCommonConstants
 *
 * @author renwd
 * @since 2019/7/29
 */
public class BasedataCommonConstants {

    public static final String BRAND_CACHE_PRODUCT_BRANDID = "cyxdms:basedata:product:brand:{0}";
    public static final String OPTION_CACHE_PRODUCT_OPTIONID = "cyxdms:basedata:product:option:{0}";
    public static final String PACKAGE_CACHE_PRODUCT_PACKAGEID = "cyxdms:basedata:product:package:{0}";
    public static final String MODEL_CACHE_PRODUCT_MODELID = "cyxdms:basedata:product:model:{0}";
    public static final String SERIAL_CACHE_PRODUCT_SERIESID = "cyxdms:basedata:product:series:{0}";
    public static final String DATA_SOURCES = "dataSources";
    public static final String ORG_TYPE = "orgType";
    public static final String DEALER_BRNAND_LIST = "brandIdList";
    public static final String PRODUCT_TYPE = "不限";
    public static final String ZERO = "0";
    public static final Integer PRODUCT_TREE_TWO = 2;
    public static final Integer PRODUCT_TREE_THREE = 3;
    public static final Integer PRODUCT_TREE_FURE= 4;
    public static final Integer PRODUCT_TREE_FIVE = 5;
    public static final Integer PRODUCT_TREE_SIX = 6;
    /**
     * 验证字符串是否是金额,验证到小数点后4位
     */
    public static final Pattern PATTERN=Pattern.compile("^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,4})?$");

    /**
     * 验证字符串是否是正整
     */
    public static final Pattern INTPATTERN=Pattern.compile("^[1-9]\\d*$");
    /**
     * 短信模板前缀
     */
    public static final String SMS_TEMPLATE  = "回复TD退订";

    /**
     * mq消息队列名
     */
    public static final String MQ_NOTIFY = "sales.after";
    public static final String ROUTE_KEY = "notify";
    /**
     * 品牌新增标识
     */
    public static final String BIZ_BRAND_INSERT = "brand_insert";
    /**
     * 品牌更新标识
     */
    public static final String BIZ_BRAND_UPDATE = "brand-update";
    /**
     * 车系新增标识
     */
    public static final String BIZ_SERIES_INSERT = "series-insert";
    /**
     * 车系更新标识
     */
    public static final String BIZ_SERIES_UPDATE = "series-update";
    /**
     * 车型新增标识
     */
    public static final String BIZ_MODEL_INSERT = "model-insert";
    /**
     * 车型新增标识
     */
    public static final String BIZ_MODEL_UPDATE = "model-update";
    /**
     * 配置新增标识
     */
    public static final String BIZ_PACKAGE_INSERT = "package-insert";
    
    /**
     * 选装新增标识
     */
    public static final String BIZ_OPTION_INSERT = "option-insert";
    /**
     * 配置修改标识
     */
    public static final String BIZ_PACKAGE_UPDATE = "package-update";
    
    /**
     * 选装修改标识
     */
    public static final String BIZ_OPTION_UPDATE = "option-update";
    /**
     * 颜色新增标识
     */
    public static final String BIZ_COLOR_INSERT = "color-insert";
    /**
     * 颜色修改标识
     */
    public static final String BIZ_COLOR_UPDATE = "color-update";

    /**
     * 是否可以发送消息到MQ
     */
    public static final String SEND_MSG_PARAM_CODE = "send_message";

    /**
     * 省
     */
    public static final int REGION_TYPE_PROVINCE = 10001001;

    /**
     * 市
     */
    public static final int REGION_TYPE_CITY = 10001002;

    /**
     * 区
     */
    public static final int REGION_TYPE_DISTRICT = 10001003;

    /**
     * NOTIFY发送地址
     */
    public static final String NOTIFY_URL = "http://OPS-NOTIFY/notify/invoke/message?channel=";

    private BasedataCommonConstants() {

    }

    /**
     * APP_ID
     */
    public static final String APP_ID = "appId";

    /**
     * OWNER_CODE
     */
    public static final String OWNER_CODE = "ownerCode";

    public static final String OWNER_PAR_CODE = "ownerParCode";

    public static final String COMPANY_CODE = "companyCode";

    /**
     * 销售顾问ID拼接，多选
     */
    public static final String CONSULTANTIDS = "consultantIds";

    /**
     * GROUP_CODE
     */
    public static final String GROUP_CODE = "groupCode";

    public static final String TOKEN_NAME = "jwt";

    public static final String AUTH = "auth";

    public static final String AUTH_USERINFO_KEY = "basedata:userInfo:";

    /**
     * 修改失败提示
     */
    public static final String UPDATE_FAILED = "此单据已经被修改，请刷新重试。";

    /**
     * 品牌转发PARAM_CODE
     */
    public static final String QUERY_BRAND = "query_brand";

    /**
     * 车系转发PARAM_CODE
     */
    public static final String QUERY_SERIES = "query_series";

    /**
     * 车型转发PARAM_CODE
     */
    public static final String QUERY_MODEL = "query_model";

    /**
     * 省市区转发PARAM_CODE
     */
    public static final String QUERY_REGION = "query_region";

    public static final Long EXPIRE_TIME_ONE_HOUR = 1000 * 60 * 60 * 1L;

    public static final String IS_VALID = "isValid";

    // 车厂
    public static final String CAR_FACTORY = "carFactory";

    // 店面
    public static final String SHOP_FRONT = "shopFront";

    public static final String NULL_STRING = "null";

    public static final String BRAND_NOT_REPEAT = "品牌代码或名称不能重复！";

    public static final String SERIES_NOT_REPEAT = "车系代码或名称不能重复！";

    public static final String MODEL_NOT_REPEAT = "车型代码或名称不能重复！";

    public static final String PACKAGE_NOT_REPEAT = "配置代码或名称不能重复！";
    
    public static final String OPTION_NOT_REPEAT = "选装代码或名称不能重复！";

    public static final String COLOR_NOT_REPEAT = "相同颜色类型的代码或名称不得重复！";

    // 产品列表redis type
    public static final Integer PRODUCT_REDIS_TYPE = 0;

    // 产品列表redis level
    public static final Integer PRODUCT_REDIS_LEVEL = 5;

    public static final String APP_ID_RL = "RL";
}
